﻿using HCD.Const;
using HCD.Web;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;

namespace HCD.EntityFrameworkCore
{
    /* This class is needed to run EF Core PMC commands. Not used anywhere else */
    public class EnterpriseDbContextFactory : DbContextFactory<EnterpriseDbContext>
    {
        public override string ConnectionStringName => EnterpriseConsts.ConnectionStringName;

        public override EnterpriseDbContext CreateDbContext(DbContextOptions<EnterpriseDbContext> options)
        {
            return new EnterpriseDbContext(options);
        }
    }
}